CFLAGS=-Wall `sdl-config --cflags`
LIBS=`sdl-config --libs`

OBJS=main.o util.o taskmanager.o video.o sprite.o title.o game.o hitcircle.o \
     player.o enemy.o musashi.o missile.o flame.o homing.o explosion.o \
     smoke.o homing_tail.o item.o radar.o

CC=gcc

default: $(OBJS)
	@echo Building yabumi 0.1.2  ...
	@$(CC) $(CFLAGS) $(OBJS) -o yabumi $(LIBS)
	@echo yabumi 0.1.2 build complete.
	@echo
	@echo Type './yabumi' to play.

clean:
	@rm -f $(OBJS)
	@rm -f *~
	@rm -f src/*~
	@rm -f src/task/*~
	@rm -f src/scene_task/*~
	@rm -f yabumi

main.o: src/main.c
	@$(CC) $(CFLAGS) -c src/main.c
util.o: src/util.c
	@$(CC) $(CFLAGS) -c src/util.c
taskmanager.o: src/taskmanager.c
	@$(CC) $(CFLAGS) -c src/taskmanager.c
video.o: src/video.c
	@$(CC) $(CFLAGS) -c src/video.c
sprite.o: src/sprite.c
	@$(CC) $(CFLAGS) -c src/sprite.c
title.o: src/scene_task/title.c
	@$(CC) $(CFLAGS) -c src/scene_task/title.c
game.o: src/scene_task/game.c
	@$(CC) $(CFLAGS) -c src/scene_task/game.c
hitcircle.o: src/task/hitcircle.c
	@$(CC) $(CFLAGS) -c src/task/hitcircle.c
player.o: src/task/player.c
	@$(CC) $(CFLAGS) -c src/task/player.c
enemy.o: src/task/enemy.c
	@$(CC) $(CFLAGS) -c src/task/enemy.c
musashi.o: src/task/musashi.c
	@$(CC) $(CFLAGS) -c src/task/musashi.c
missile.o: src/task/missile.c
	@$(CC) $(CFLAGS) -c src/task/missile.c
flame.o: src/task/flame.c
	@$(CC) $(CFLAGS) -c src/task/flame.c
homing.o: src/task/homing.c
	@$(CC) $(CFLAGS) -c src/task/homing.c
explosion.o: src/task/explosion.c
	@$(CC) $(CFLAGS) -c src/task/explosion.c
smoke.o: src/task/smoke.c
	@$(CC) $(CFLAGS) -c src/task/smoke.c
homing_tail.o: src/task/homing_tail.c
	@$(CC) $(CFLAGS) -c src/task/homing_tail.c
item.o: src/task/item.c
	@$(CC) $(CFLAGS) -c src/task/item.c
radar.o: src/task/radar.c
	@$(CC) $(CFLAGS) -c src/task/radar.c

